<template>
	<div id = "Home">
			<!-- 导航栏 -->
		<div class="div_class_banner">
			<div class="container">
				<nav class="navbar navbar-default navbar-static" id ="navbar-example">
					<div class="navbar-header">
						<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
							<span class="sr-only">Toggle navigation</span>
							<span class="icon-bar"></span>
							<span class="icon-bar"></span>
							<span class="icon-bar"></span>
						</button>
					</div>
					<div class="collapse navbar-collapse nav-wil bs-js-navbar-scrollspy" id="bs-example-navbar-collapse-1">
						<ul class="nav navbar-nav  ul_class_after" v-for="(item,index) in navigation">
							<li>
								<a href="#" class = "a_class_jump" @click="jump(item.item)">{{item.item}}</a>
							</li>
						</ul>
					</div>
				</nav>
		<div class="div_class_banner_Info">
			<div class="div_class_logo">
				<h3><a href="#">P</a></h3>
			</div>
			<h1>Pecuniary</h1>
			<p>Nam libero tempore, cum soluta nobis .</p>
		</div>
	</div>
	</div>
		<About id="About"></About>
		<Services id = "Services"></Services>
		<Portfolio id = "Portfolio"></Portfolio>
	</div>
</template>
<script type="text/javascript">
	import About from '../../components/Home/About.vue'
	import Services from '../../components/Home/Services.vue'
	import Portfolio from'../../components/Home/Portfolio.vue'
	export default{
		data(){
			return{
				navigation:[{
					item : 'Home',
				},
				{
					item : 'About',
				},
				{
					item : 'Services',
				},
				{
					item : 'Portfolio',
				},
				{
					item : 'Team',
				},
				{
					item : 'News',
				},
				{
					item :'Contact',
				}
				],
			}
		},
		methods:{
			jump(item){
	    		var top = $('#'+item).offset().top;
	    		if(item == 'Home'){
	    			
	    		}
	    		else if(item == 'About'){ 
	    			$('html,body').animate({scrollTop:top},1500);
	    		}
	    		else{
	        		$('html,body').animate({scrollTop:top},2000);  
	    		}
			}
		},
		components:{
			About,
			Services,
			Portfolio
		},
	}
</script>
<style type="text/css" scoped>
/*-- navigation --*/
.navbar {
  position: relative;
  min-height: 0;
  margin-bottom: 0;
  border: none;
}
.navbar-default {
  border: none;
  background-color: rgba(248, 248, 248, 0);
}
.navbar-collapse {
  padding-right: 0;
  padding-left: 0;  
  }
.navbar-default .navbar-nav > li > a {
    color: #fff;
}
.navbar-default .navbar-nav > li > a:hover {
  color:#fff;
  background-color: transparent;
}
.navbar-default .navbar-nav > li > a:focus{
  color:#fff;
}
.navbar-nav > li {
   margin: 0 10px;
}
.navbar-nav {
    margin: 0px;
}
.nav > li > a {
 	text-align:center;
	font-size:1.1em;
  	position: relative;
  	padding: 30px 10px !important;
  	letter-spacing: 1px;
}
.div_class_logo {
	margin-bottom:1em;
}
.div_class_logo a {
    border: 6px double #fff;
    padding: 0.2em 0.5em;
    border-radius: 50%;
    font-size: 3em;
    color: #fff;
    display: inline-block;
    text-decoration: none;
    background: #013040;
    transition: margin-top 1s linear 0s;
	animation: animate_positive 2s;
}
/*-- Link Effect: bottom border hover过渡 --*/
.ul_class_after a::after {
	position: absolute; /*相对于父级容器navbar-collapse（导航栏）定位*/
	top: 90%;
	left: 0;
	width: 100%;
	background:#fff;
	height: 1px;
	content: '';  /* :after 伪元素在元素之后添加内容*/
	opacity: 0;
	-webkit-transition: height 0.3s, opacity 0.3s, -webkit-transform 0.3s;
	-moz-transition: height 0.3s, opacity 0.3s, -moz-transform 0.3s;
	transition: height 0.3s, opacity 0.3s, transform 0.3s;
	-webkit-transform: translateY(-10px);
	-moz-transform: translateY(-10px);
	transform: translateY(-10px);
}
.ul_class_after a:hover::after,
.ul_class_after a:focus::after {
	height: 5px;
	opacity: 1;
	-webkit-transform: translateY(0px);
	-moz-transform: translateY(0px);
	transform: translateY(0px);
}

.div_class_banner{
	background:url("https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1529511504196&di=1f4e0784e4b959758f3f215f354f6d44&imgtype=0&src=http%3A%2F%2Fpic.90sjimg.com%2Fback_pic%2Fu%2F00%2F00%2F95%2F36%2F55e6adaaa0bb2.jpg");
	background-size:cover;  /*将背景图片扩展到足够大，*/
	-webkit-background-size: cover;
	-o-background-size: cover;
	-ms-background-size: cover;
	-moz-background-size: cover;
	min-height: 947px;
	position: relative;
	overflow: auto;
}
.div_class_banner_Info {
    margin: 16em 0 0;
    text-align: center;
}
.div_class_banner_Info h1 {
    font-size: 4em;
    color:#fff;
    margin: 0;
}
.div_class_banner_Info p {
    font-size: 1.5em;
    color: #fff;
    margin: 0.5em 0;
    line-height: 1.2em;
}
.div_class_banner_Info h1{
	transition: margin-top 1s linear 0s;
	animation: animate_positive 2s;
}
@-webkit-keyframes animate_positive{
		0% { margin-top:  10%; }
	}
@keyframes animate_positive{
		0% { margin-top: 10%; }
	}
@media(max-width: 414px){
	.div_class_banner{
		background:url("https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1529511504196&di=1f4e0784e4b959758f3f215f354f6d44&imgtype=0&src=http%3A%2F%2Fpic.90sjimg.com%2Fback_pic%2Fu%2F00%2F00%2F95%2F36%2F55e6adaaa0bb2.jpg") no-repeat -150px 0px;
		min-height: 400px;
	}
	.div_class_banner_Info {
    	margin: 5em 0 0;
    	text-align: center;
	}

	.div_class_logo a{
    	font-size: 1.8em;
	}
	.div_banner-info{
    	margin: 6em 0 0;
	}
	.div_class_banner_Info h1{
    	font-size: 1.3em;
	}
	.div_class_banner_Info p {
    	font-size: 1em;
    	margin: 0.5em 0;
    	line-height: 0.8em;
	}
	.nav > li > a {
 	text-align:center;
	font-size:1.1em;
  	position: relative;
  	padding: 15px 5px !important;
  	letter-spacing: 1px;
	}
	@-webkit-keyframes animate_positive{
		0% { margin:  40em 0 0; }
	}
	@keyframes animate-positive{
		0% { margin:  40em 0 0; }
	}
}
</style>